package com.twu.biblioteca;

public class Movie {
    private String title = "";
    private int year = 0;
    private String director = "";
    private int rating = 0; //scale of 1-10, 0 is N/A

    public Movie(String title, int year, String director, int rating){
        this.title = title;
        this.year = year;
        this.director = director;
        this.rating = rating;
    }

    public Movie(String title, int year, String director){
        this.title = title;
        this.year = year;
        this.director = director;
    }

    public String getTitle() {
        return this.title;
    }

    public int getYear() {
        return this.year;
    }

    public String getDirector() {
        return this.director;
    }

    public String getRating() {
        if (rating==0)
            return "N/A";
        else
            return Integer.toString(this.rating)+"/10";
    }





}
